<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path=request.getContextPath();
	String basePath=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	
%>   
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>>"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录</title>
	<style>
		body{
			font-size:14px;
		}
		table.altrowstable {
	    qont-family: verdana,arial,sans-serif;
		    border-width: 1px;
		    border-color: #a9c6c9;
		    border-collapse: collapse;
		    width: 300px;
		    height: 50px;
		    text-align:center;
		   
		}
		table.altrowstable th {
		    border-width: 1px;
		    padding: 8px;
		    border-style: solid;
		    border-color: #a9c6c9;
		}
		table.altrowstable td {
		    border-width: 1px;
		    padding: 8px;
		    border-style: solid;
		    border-color: #131a1b;
		}
		.input{
			background-color: transparent;
			border-width:0.5;
			text-align: center;
		}
		.td1 {
			width: 500px;
		}
		.oddrowcolor{
		    background-color:#d4e3e5;
		}
		.evenrowcolor{
		    background-color:#c3dde0;
		}
	</style>
</head>
<body>
	<form action="" method="POST">
		<div align="center">
		<input type="hidden" id="userId" name="iUserId" value="${manager.iUserId}"/>
		<table class="altrowstable" id="alternatecolor">
				<tr>
					<td class="td1">姓名</td>
					<td>${manager.sName}</td>
				</tr>
				<tr>
					<td class="td1">性别</td>
					<td><c:if test="${manager.sSex==2}">男</c:if><c:if test="${manager.sSex==3}">女</c:if></td>
				</tr>
				<tr>
					<td class="td1">年龄</td>
					<td>${manager.iAge}</td>
				</tr>
				<tr>
					<td class="td1">身份证</td>
					<td>${manager.sIdCard}</td>
				</tr>
				<tr>
					<td class="td1">民族</td>
					<td>${manager.sNation}</td>
				</tr>
				<tr>
					<td class="td1">电话</td>
					<td><input type="text" class="input" id="tel" name="sTel" maxlength="11"
						value="${manager.sTel}" style="background-color: transparent" onkeyup="value=value.replace(/[^(\d)]/g,'')"/></td>
				</tr>
				<tr>
					<td class="td1">住址</td>
					<td><input type="text" class="input" id="address" name="sAddress" maxlength="26" 
						value="${manager.sAddress}" style="background-color: transparent" /></td>
				</tr>
				<tr>
					<td colspan="2"><input type="button" value="修改"
						onclick="doUpdate()" style="opacity: 0.5" /><input type="button"
						value="返回" onclick="window.location='jsp/login/logout.jsp?url=login/login.action'"
						style="opacity: 0.5" /></td>
				</tr>
				<tr>
					<td colspan="2">注：修改其他信息请 找管理员</td>
				</tr>
			</table>
		</div>
	</form>
</body>
	<script type="text/javascript" src="js/jquery-3.2.1.js"></script>
	<script type="text/javascript">
	function doUpdate(){
		if("" == $("#address").val()||$("#address").val().match(/[^\u4e00-\u9fa5]/)){
			alert("输入不能为空");
			return false;
		}
		if(11 != $("#tel").val().length){
			alert("请输入正确的手机号码");
			return false;
		}
		var str = "manager/update.action?iUserId=" + $("#userId").val()+"&sAddress="+$("#address").val()+"&sTel="+$("#tel").val();
		window.location=str;
	}
	</script>
</html>